/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.farmcode.console.api.dao.impl;



import com.farmcode.base.dao.BaseDAOImpl;
import com.farmcode.base.dao.DAOException;
import com.farmcode.console.api.dao.ProjectDAO;
import com.farmcode.console.api.model.Project;
import java.util.List;

/**
 *
 * @author oiprado
 */
public class BaseProjectDAOImpl extends BaseDAOImpl<Project> implements ProjectDAO {  
  
  @Override
  public List<Project> find() throws DAOException {
	sqlQuery = "select project from Project project";
	sqlQuery = sqlQuery + " join project.status";
	sqlQuery = sqlQuery + " join project.language";
	sqlQuery = sqlQuery + " join project.database";
	sqlQuery = sqlQuery + " join project.packageTemplate";
	sqlQuery = sqlQuery + buildWhere();
    return super.find();
  } 
}
